import React, { forwardRef, useState, useEffect } from 'react'
import { Badge, Descriptions } from 'antd';
import './showuser.scss'
import * as echarts from "echarts";
const Showuser = forwardRef((props, ref) => {
    const [infodata, setdata] = useState([])
    const getdata = () => {
        console.log(ref);
        setdata(ref)
    }

    const drawlist = () => {
        let { title, age, birth, weight, vision, height, addr, sex, bloodfat, bloodsugar, renalfunction, liverfunction,suggestslist } = ref;
        // console.log(ref);
        return (
            <div id='xiuer'>
                <Descriptions title={title}></Descriptions>
            </div>
        )
    }

    useEffect(() => {
        getdata()
        drawlist()
    }, [])
    // console.log(ref);
    return (
        <div className='showlist'>
            {drawlist()}

        </div>
    )
})

export default Showuser